﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using PBOffice.DAL;
using PBOffice.BLL;

public partial class MeetingManager_MeetingScan : System.Web.UI.Page
{
    MeetingManagerBLL mb = new MeetingManagerBLL();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            dlMeeting.DataSource = mb.GetRoomType();
            dlMeeting.DataTextField = "RoomTypeId";
            dlMeeting.DataValueField = "RoomTypeNo";
            dlMeeting.DataBind();  //绑定会议室类型

            string  roomTypeId = dlMeeting.SelectedItem.Text;
            fvMeeting.DataSource = mb.GetMeeting(roomTypeId);
            fvMeeting.DataBind();
        }
        
    }
    protected void dlMeeting_SelectedIndexChanged(object sender, EventArgs e)
    {

        string roomTypeId = dlMeeting.SelectedItem.Text;
        fvMeeting.DataSource = mb.GetMeeting(roomTypeId);
        fvMeeting.DataBind();  //绑定会议室信息
    }

    protected void lbMeeting_Command(object sender, CommandEventArgs e)
    {
        Response.Redirect("~/MeetingManager/MeetingBook.aspx");//转到预定会议室界面
    }
}